package example.method.p14;

/**
 * @author 17976
 */
public class Main {
    static int sumvarargs(int... intArrays){
        int sum = 0;
        for (int i=0 ;i<intArrays.length;i++) {
            sum += intArrays[i];
        }
        return (sum);
    }

    public static void main(String[] args) {
        int sum=0;
        sum=sumvarargs(new int[]{10,12,33});
        System.out.println("数字相加之和为: " + sum);
    }
}
